package parser;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		Parser p = new Parser();
		try{
			String in = br.readLine();
			while(in != null && !in.toUpperCase().equals("DONE")){
				System.out.println(p.getResult(in));
				in = br.readLine();
			}
			System.out.println("Exiting");
		} catch(IOException e){
			System.out.println(e.getMessage());
		}

		

	}

}
